package com.kingyea.kim.trip.dao;

import com.kingyea.kim.trip.bean.Trip;
import com.kingyea.kim.trip.condition.TripCondition;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author lgy
 * @version v1.0.0
 * @description
 * @date Created in 2018/8/20 0020 16:26
 */
@Mapper
public interface TripMapper {

    /**
     *
     * 根据日期、标题获取对象
     */
    List<Trip> selectByCondition(TripCondition condition);

    /**
     *
     * 获取待办状态数量
     */
    Integer selectCount();

    /**
     * 添加日程
     */
    Long addTrip(TripCondition condition);

    /**
     * 修改日程状态
     */
    Long update(TripCondition tripCondition);

    /**
     * 根据ID查找对象
     */
    Trip selectById(@Param("id") Integer id);

    /**
     *
     * 删除日程
     */
    Integer deleteById(@Param("id") Integer id);

    //日期查询
    List<String> selectTripDate(TripCondition condition);

    //通过日期获取对象
    List<Trip> selectByTripDate(TripCondition condition);

}